package cn.ming.wfchat.app.me.activity;

import android.content.Intent;
import android.text.TextUtils;

import butterknife.BindView;
import butterknife.OnClick;
import cn.ming.wfchat.R;
import cn.ming.wfchat.kit.WfcBaseActivity;
import cn.ming.wfchat.kit.utils.Tools;
import cn.ming.wfchat.kit.widget.OptionItemView;
import cn.wildfirechat.remote.ChatManager;

/**
 * @author luoming
 * created at 2020/9/7 3:15 PM
 * 安全
 */
public class SecurityActivity extends WfcBaseActivity {

    @BindView(R.id.ll_zjmm)
    OptionItemView llZjmm;
    @BindView(R.id.ll_sjh)
    OptionItemView llSjh;
    @BindView(R.id.ll_dlmm)
    OptionItemView llDlmm;
    @BindView(R.id.ll_unlock)
    OptionItemView llUnlock;
    @BindView(R.id.ll_destruction)
    OptionItemView llDestruction;

    @Override
    protected int contentLayout() {
        return R.layout.activity_security;
    }

    @Override
    protected void afterViews() {

        setTitle("隐私安全");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    @OnClick(R.id.ll_zjmm)
    void setLlZjmm() {
        Intent intent = new Intent(SecurityActivity.this, SetZjmmActivity.class);
        startActivity(intent);

    }

    @OnClick(R.id.ll_sjh)
    void setLlsjh() {
        Intent intent = new Intent(SecurityActivity.this, SetSjhActivity.class);
        startActivity(intent);
    }

    @OnClick(R.id.ll_dlmm)
    void setLDlmm() {
        Intent intent = new Intent(SecurityActivity.this, SetDlmmActivity.class);
        startActivity(intent);
    }

    @OnClick(R.id.ll_unlock)
    void setLlUnlock() {
        if (!TextUtils.isEmpty(ChatManager.getLockPassword())) {
            Tools.jump(SecurityActivity.this, SetModifyUnlockActivity.class, false);
        } else {
            Tools.jump(SecurityActivity.this, SetUnlockActivity.class, false);
        }
    }

    @OnClick(R.id.ll_destruction)
    void setLlDestruction() {
        if (!TextUtils.isEmpty(ChatManager.getDestroyPassword())) {
            Tools.jump(SecurityActivity.this, SetModifyDestructionActivity.class, false);
        } else {
            Tools.jump(SecurityActivity.this, SetDestructionActivity.class, false);
        }
    }
}
